#ifndef _GAME_ENTITY_H_
#define _GAME_ENTITY_H_

#include "Box2D/Box2D.h"
#include "cocos2d.h"
#include "CCPhysicsSprite.h"

USING_NS_CC;

enum EntityType
{
  GROUP = 0,
  PLAYER = 1,
  GROUND = 2,
  OBSTACLE = 3,
  PROP = 4,
};

class Player;

class GameEntity : public CCPhysicsSprite
{
  public:
    GameEntity(b2World * pWorld);
    virtual ~GameEntity();
    virtual EntityType getEntityType() = 0;
    b2Body * getBody();
    virtual void contactBeganWithPlayer(Player * pPlayer, b2Contact * pContact);
    virtual void contactEndWithPlayer(Player * pPlayer, b2Contact * pContact);
    virtual void destroyBody();
    virtual void createBody() = 0;
  protected:
    b2World * pWorld;
};

#endif
